{{extend './base.html'}}
{{block 'titleBlock'}}店家详情页{{/block}}
{{block 'scriptBlock'}}
<script type="text/javascript" src="/js/web_detail.js"></script>
<script type="text/javascript" src="/js/web_merchant.js"></script>
{{/block}}
{{block 'contentBlock'}}
<div class="container">
    <div class="show_left">
        <div class="merchant">
            <div class="merchant_img">
                <img src="{{merchantInfo.head_url}}" alt="">
            </div>
            <div class="merchant_name">
                {{merchantInfo.nick_name}}
            </div>
            <div class="merchant_abstract">
                关注人数：{{concernCounts}}
            </div>
            <div class="merchant_private_letter">
                <a href="javascript:;">私信</a>
                <script>
                    $(function() {
                        $(".merchant_private_letter a").click(function(e){
                            e.preventDefault()
                            location.href="/web_private_letter/?merchant_id={{merchantInfo.user_id}}&user_id={{user_info.user_id}}"
                        });
                    });
                </script>
            </div>
            <div class="merchant_concern">
                <button class="concern" style="display: {{isFollow?'none':'block'}}" data-userid="{{merchantInfo.user_id}}">关注</button>
                <button class="concerned" style="display: {{isFollow?'block':'none'}}" data-userid="{{merchantInfo.user_id}}"><span class="out">已关注</span><span class="over">取消关注</span></button>
            </div>
        </div>
        <div class="merchant_show">
            <div class="merchant_left">
                {{each classify}}
                <a href="javascript:;" data-aid="{{$value.classify_id}}" data-mid="{{merchantInfo.user_id}}">
                    {{$value.classify_name}}
                </a>
                {{/each}}
            </div>
            <div class="merchant_right">
                <ul>
                    {{each commodity}}
                    <a href="/commodity_detail/{{$value.commodity_id}}">
                        <li>
                        <img src="{{$value.commodity_url}}" alt="">
                        <div>
                            <p>{{$value.commodity_name}}</p>
                            <p>单价：￥{{$value.unit_price}}</p>
                            <p>收藏数：{{$value.collects}}</p>
                            <h3>详情&rsaquo;</h3>
                        </div>
                        </li>
                    </a>
                    {{/each}}
                </ul>
            </div>
        </div>
    </div>
    <div class="show_right">
        <ul>
            <li>销量排行</li>
            {{each salesOrder}}
            <li>
                <span class="rank_{{$index+1}}">{{$index+1}}</span>
                <a href="/commodity_detail/{{$value.commodity_id}}">{{$value.commodity_name}}</a>
            </li>
            {{/each}}
        </ul>
    </div>
</div>
{{/block}}